package com.ice.work.study.design.pattern.factory;


import com.ice.work.study.design.pattern.factory.enums.ProductType;

/**
 * @Description 工厂模式测试
 * @Author DELL
 * @Create 2019-11-25
 * @Since 1.0.0
 */
public class FactoryTest {
    public static void main(String[] args) {
        ProductFactory productFactory = ProductFactory.getInstance();
        Product product = productFactory.getProduct(ProductType.FOOD.value());
        product.show();
        product = productFactory.getProduct(ProductType.BEER.value());
        product.show();
        product = productFactory.getProduct(ProductType.MILK.value());
        product.show();
    }
}
